package org.jawa.exam.model;

import org.jawa.core.cache.CacheSizes;
import org.jawa.core.cache.Cacheable;
import org.jawa.core.cache.CannotCalculateSizeException;
import org.jawa.core.exception.NotFoundException;
import org.jawa.jdbc.Lazyable;

/**
 * 
 * 类文件: QuestionSort
 * <p>
 * <p>
 * 类描述：试题分类表
 * <p>
 * 作 者： Y-N
 * <p>
 * 日 期： 2012-8-16
 * <p>
 * 时 间： 下午9:22:45
 * <p>
 */
public class QuestionSort implements Cacheable, Lazyable {

	private static final long serialVersionUID = 7451332800927469472L;

	protected static final String DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";

	/**
	 * 试题分类编号
	 * 
	 * @return
	 */
	private Long sortId;
	/**
	 * 业务分类名称
	 */
	private String sortName;

	public Long getSortId() {
		return sortId;
	}

	public void setSortId(Long sortId) {
		this.sortId = sortId;
	}

	public String getSortName() {
		return sortName;
	}

	public void setSortName(String sortName) {
		this.sortName = sortName;
	}

	/**
	 * 返回估算的对象在缓存中的占用大小
	 * <p>
	 * Title: getCachedSize
	 * </p>
	 * <p>
	 * Description:
	 * </p>
	 * 
	 * @return
	 * @throws CannotCalculateSizeException
	 * @see org.jawa.core.cache.Cacheable#getCachedSize()
	 */
	public int getCachedSize() throws CannotCalculateSizeException {
		int size = 0;
		size += CacheSizes.sizeOfObject();
		size += CacheSizes.sizeOfLong();
		size += CacheSizes.sizeOfString(sortName);
		return size;
	}

	@Override
	public void load() throws NotFoundException {

	}

}
